<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Dispatcher Example - Dynamically Loading Content</title>
<meta name='author' content='Caridy Patino (caridy at gmail.com)' />
<!-- Reset and Fonts -->
<link rel="stylesheet" type="text/css" href="../assets/example.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.2.2/build/button/assets/button.css">

<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/utilities/utilities.js"></script>
<script type="text/javascript" src="../../../yui-cms/build/dispatcher/dispatcher.js"></script>
<style type="text/css">
#demo {
    width:40em; /* arbitrary width */
}

#demo .yui-content {
    padding:1em;
}

#demo .loading {
    background-image:url(img/loading.gif);
    background-position:center center;
    background-repeat:no-repeat;
}

#demo .loading * {
    display:none;
}

.boxing { 
	float: left; 
	width: 45%;
	border: 1px solid;
	margin: 1%;
	padding: 1%;
}


</style>

<script type="text/javascript">
	
YAHOO.example.init = function() {

    YAHOO.util.Dispatcher.fetch ( 'boxwithinlinescript', 'tabs/xhtml.with.inline.scripts.html' );
    YAHOO.util.Dispatcher.fetch ( 'boxwithremotescript', 'tabs/xhtml.with.remote.scripts.html', {action: 'add'} );

};

YAHOO.example.init();
</script>

</head>
<body id="cms-body">
<div id="doc">

	<div class="path">
	  <a href="http://bubbling.comarq.com/" target="_top">Bubbling Library</a> &gt; <a href="http://bubbling.comarq.com/eng/examples" target="_top">Examples</a>
	</div>

    <h1>Dispatcher Example - Dynamically loading content with script inside</h1>
    <p>This is an example of the DISPATCHER feature over two DIV tags, you can use the dispatcher to managing the content inside each DIV. This feature will warranty the execution of the scripts (remote and inline "script" tags) during the URI request.</p>
	
	<div class="boxing">
		<h3>Dynamic content with inline scripts</h3>
		<div id="boxwithinlinescript">
			<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit  amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui.  Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus,  quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque  orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam  erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi.  Class aptent taciti sociosqu ad litora torquent per conubia nostra, per  inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis  ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris.  Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec  et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo,  facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend.</p>
	  </div>
	</div>
	
	<div class="boxing">
		<h3>Dynamic content with remote scripts</h3>
		<div id="boxwithremotescript">
			<p> Class aptent taciti sociosqu ad litora torquent per conubia nostra, per  inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis  ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris.  Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec  et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo,  facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit  amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui.  Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus,  quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque  orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam  erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi.</p>
	  </div>
	</div>

</div>



</body>
</html>
